#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
#include<sys/fcntl.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<arpa/inet.h>
int main(int argc, char const *argv[])
{
    int fd=socket(AF_INET,SOCK_DGRAM,0);
    struct sockaddr_in peeraddr;
    bzero(&peeraddr,sizeof(peeraddr));
    peeraddr.sin_family=AF_INET;
    peeraddr.sin_addr.s_addr=inet_addr("192.168.11.45");
    peeraddr.sin_port=htons(50002);
    char buf[100];
    while(1)
    {
        bzero(buf,100);
        fgets(buf,100,stdin);
        sendto(fd,buf,100,0,(struct sockaddr *)&peeraddr,sizeof(peeraddr));
    }
    
    return 0;
}
